package edu.kit.csl.pisa.models;

/**
 * This sentence length model represents a negative binomial distribution, but
 * with only one parameter. We force the mean of the distributions to be equal
 * to the number of source tokens and thereby derive the p parameter from the
 * r parameter.
 */
public class RestrictedNBSentenceLengthModel extends NBSentenceLengthModel {
	/**
	 * Sole constructor. 
	 * 
	 * @param model alignment model
	 */
	public RestrictedNBSentenceLengthModel(Model4P model) {
		super(model);
		// Re-initialize estimators with restricted versions
		for (int i = 0; i <= maxSrcSenLen; i++) {
			estimators[i] = new RestrictedNBEstimator(i);
		}
	}
}
